import React from "react";
import styles from "./index.less";
import { Table, Tag } from "antd";

const columns = [
  {
    title: "工号",
    dataIndex: "workNo",
    key: "workNo",
    render: text => <a>{text}</a>
  },
  {
    title: "姓名",
    dataIndex: "userName",
    key: "userName"
  },
  {
    title: "性别",
    dataIndex: "sex",
    key: "sex"
  },
  {
    title: "手机号",
    key: "phoneNo",
    dataIndex: "phoneNo"
  },
  {
    title: "机组",
    key: "engineGroup",
    dataIndex: "engineGroup"
  },
  {
    title: "操作",
    key: "action",
    render: (text, record) => (
      <span>
        <a style={{ marginRight: 16 }}>修改</a>
        <a>删除</a>
      </span>
    )
  }
];

const data = [
  {
    workNo: "53001",
    userName: "张甜甜",
    sex: '女',
    phoneNo: "13218938274",
    engineGroup: 'HR07-02小组'
  },
  {
    workNo: "53002",
    userName: "李志刚",
    sex: '男',
    phoneNo: "13218938276",
    engineGroup: 'HR07-02小组'
  },
  {
    workNo: "53003",
    userName: "蒋家桥",
    sex: '男',
    phoneNo: "13218938271",
    engineGroup: 'S12346小组'
  },
];

export default () => (
  <div className={styles.container}>
    <div id="components-table-demo-basic">
      <Table columns={columns} dataSource={data} />
    </div>
  </div>
);
